<?php
namespace Client\Table;

use Zend\Db\Sql\Select;
use Zend\Db\Sql\Where;

class UserBalanceLogTable extends CommonTable
{
    protected $table = 'hy_user_balance_log';
    protected $id = 'ubl_id';
    
    public function getList($query = array())
    {
        $select = new Select(array('l'=>$this->getTable()));
        $select->columns( array(
            "*"
        ));
    
        $select->where(array('l.user_id'=>$query['user_id']));
    
        $select->order(array('l.ubl_id desc'));
    
        $rowset = $this->selectWith($select);
        $list = $rowset->toArray();
    
        return $list;
    }
}